Part Number Hot Search : 
A2100 MC78L 06780 EP1S40 EP1S40 4414FG FSL214R MC78L
Product Description
Full Text Search
 

To Download XR16C285205 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  exar corporation 48720 kato road, fremont ca, 94538 ? (510) 668-7000 ? fax (510) 668-7017 ? www.exar.com xr xr16c2852 2.97v to 5.5v dual uart with 128-byte fifos february 2005 rev. 2.1.1 general description the xr16c2852 1 (2852) is a dual universal asynchronous receiver and transmitter (uart). the device operates at 2.97v to 5.5v and is pin-to-pin compatible to exar?s st16c2552 and xr16l2752. the 2852 register set is compatible to the st16c2552 and the xr16l2752 enhanced features. it supports the exar?s enhanced features of 128 bytes of tx and rx fifos, programmable fifo trigger level and fifo level counters, automatic hardware (rts/cts) and software flow control, automatic rs- 485 half duplex direction control output and a complete modem interface. onboard registers provide the user with operational status and data error flags. an internal loopback capability allows system diagnotics. independent programmable baud rate generators are provided in each channel to select data rates up to 3.125 mbps at 5v. the 2852 is available in the 44-pin plcc package. n ote : 1 covered by u.s. patent #5,649,122 and #5,949,787 applications ? portable appliances ? telecommunication network routers ? ethernet network routers ? cellular data devices ? factory automation and process controls features added feature in devices with a top mark date code of "f2 yyww" and newer: 5v tolerant inputs 0 ns address hold time (t ah ) ? pin-to-pin compatible to exar?s st16c2552 and xr16l2752 ? improved version of pc16c552 ? two independent uart channels register set compatible to 16c550 up to 3 mbps at 5v, and 2 mbps at 3.3v transmit and receive fifos of 128 bytes programmable tx and rx fifo trigger levels transmit and receive fifo level counters automatic hardware (rts/cts) flow control selectable auto rts flow control hysteresis automatic software (xon/xoff) flow control automatic rs-485 ha lf-duplex direction control output wireless infrared (irda 1.0) encoder/decoder automatic sleep mode ? alternate function register ? device identification and revision ? crystal oscillator or external clock input ? 2.97 to 5.5 volt operation ? industrial and commercial temperature ranges f igure 1. xr16c2852 b lock d iagram mfa# (op2a#, baudouta#, or rxrdya#) mfb# (op2b#, baudoutb#, or rxrdyb#) xtal1 xtal2 crystal osc/buffer txa (or txira) 8-bit data bus interface uart channel a 128 byte tx fifo 128 byte rx fifo brg ir endec tx & rx uart regs 2.97v to 5.5v vcc gnd uart channel b (same as channel a) a2:a0 d7:d0 cs# chsel inta intb iow# ior# reset txrdya# txrdyb# cts#a/b, ri#a/b, cd#a/b, dsr#a/b rxa (or rxira) modem control logic dtr#a/b, rts#a/b txb (or txirb) rxb (or rxirb)
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 2 f igure 2. p in o ut a ssignment ordering information p art n umber p ackage o perating t emperature r ange d evice s tatus xr16c2852cj 44-plcc 0c to +70c active xr16c2852ij 44-plcc -40c to +85c active 6 5 4 3 2 1 44 43 42 41 40 7 8 9 10 11 12 13 14 15 16 17 39 38 37 36 35 34 33 32 31 30 29 18 19 20 21 22 23 24 25 26 27 28 d5 d6 d7 a0 xtal1 gnd xtal2 a1 a2 chsel intb rxa txa dtra# rtsa# mfa# inta vcc txrdyb# rib# cdb# dsrb# cs# mfb# iow# reset gnd rtsb# ior# rxb txb dtrb# ctsb# d4 d3 d2 d1 d0 txrdya# vcc ria# cda# dsra# ctsa# xr16c2852 44-pin plcc
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 3 pin descriptions pin description n ame 44-plcc p in # t ype d escription data bus interface a2 a1 a0 15 14 10 i address data lines [2:0]. these 3 address lines select one of the internal registers in uart channel a/b during a data bus transaction. d7 d6 d5 d4 d3 d2 d1 d0 9 8 7 6 5 4 3 2 i/o data bus lines [7:0 ] (bidirectional). ior# 24 i input/output read strobe (active low). the falling edge instigates an internal read cycle and retrieves the data byte from an inte rnal register pointed to by the address lines [a2:a0]. the data byte is placed on the data bus to allow the host processor to read it on the rising edge. iow# 20 i input/output write strobe (active low). the falling edge instigates an internal write cycle and the rising edge transfers the data byte on the data bus to an internal regis - ter pointed by the address lines. cs# 18 i uart chip select (active low). this function selects channel a or b in accordance with the logical state of the chsel pin. this allows data to be transferred between the user cpu and the 2852. chsel 16 i channel select - uart channel a or b is selected by the logical state of this pin when the cs# pin is low. a low on the chsel selects the uart channel b while a high selects uart channel a. normally, chsel could just be an address line from the user cpu such as a4. bit-0 of the altern ate function register (afr) can temporarily override chsel function, allowing the user to write to both channel register simulta - neously with one write cycle when cs# is low. it is especially useful during the ini - tialization routine. inta 34 o uart channel a interrupt output (active high). a logic high indicates channel a is requesting for service. for more details, see figures 20 - 25 . intb 17 o uart channel b interrupt output (active high). a logic high indicates channel b is requesting for service. for more details, see figures 20 - 25 . txrdya# 1 o uart channel a transmitter ready (active low). the output provides the tx fifo/thr status for transmit channel a. see ta b l e 2 on page 9 . if this output is not used, leave it unconnected. txrdyb# 32 o uart channel b transmitter ready (active lo w). the output provides the tx fifo/ thr status for transmit channel b. see table 2 on page 9 . if this output is not used, leave it unconnected. modem or serial i/o interface txa 38 o uart channel a transmit data or infrared encoder data. standard transmit and receive interface is enabled when mcr[6] = 0. in this mode, the tx signal will be high during reset or idle (no data). infrared irda transmit and receive interface is enabled when mcr[6] = 1. in the infrared m ode, the inactive state (no data) for the infrared encoder/decoder interface is a logi c 0. if this output is not used, leave it unconnected.
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 4 rxa 39 i uart channel a receive data or infrared receive data. normal receive data input must idlehigh. the infrared receiver pulses typically idles low but can be inverted by software control prior going in to the decoder, see mcr[6] and fctr[2]. if this pin is not used, tie it to vcc or pull it high via a 100k ohm resistor. rtsa# 36 o uart channel a request-to-send (active low) or general purpose output. this output must be asserted (low) prior to using auto rts flow control, see efr[6], mcr[1], fctr[1:0], emsr[5:4] and ier[6]. for auto rs485 half-duplex direction control, see fctr[3]. if this output is not used, leave it unconnected. ctsa# 40 i uart channel a clear-to-send (active low) or general purpose input. it can be used for auto cts flow control, see efr[7], and ier[7]. this input should be connected to vcc when not used. dtra# 37 o uart channel a data-terminal-ready (active low) or general purpose output. if this output is not used, leave it unconnected. dsra# 41 i uart channel a data-set-ready (active low) or general purpose input. this input should be connected to vcc when not used. cda# 42 i uart channel a carrier-detect (active low) or general purpose input. this input should be connected to vcc when not used. ria# 43 i uart channel a ring-indicator (active low) or general purpose input. this input should be connected to vcc when not used. mfa# 35 o multi-function output channel a. this ou tput pin can function as the op2a#, baud - outa#, or rxrdya# pin. one of these output signal functions can be selected by the user programmable bits 1-2 of the alternate function register (afr). these sig - nal functions are described as follows: 1) op2a# - when op2a# (active low) is selected, the mf# pin is low when mcr bit- 3 is set to a logic 1 (see mcr bit-3). mcr bit-3 defaults to a logic 0 condition after a reset or power-up. 2) baudouta# - when baudouta# function is selected, the 16x baud rate clock output is available at this pin. 3) rxrdya# - rxrdya# (active low) is intended for monitoring dma data transfers. see ta b l e 2 on page 9 for more details. if this output is not used, leave it unconnected. txb 26 o uart channel b transmit data or infrared encoder data. standard transmit and receive interface is enabled when mcr[6] = 0. in this mode, the tx signal will be high during reset or idle (no data). infrared irda transmit and receive interface is enabled when mcr[6] = 1. in the infrared m ode, the inactive state (no data) for the infrared encoder/decoder interface is low. if this output is not used, leave it uncon - nected. rxb 25 i uart channel b receive data or infrared receive data. normal receive data input must idle high. the infrared receiver pul ses typically idles low but can be inverted by software control prior going in to the decoder, see mcr[6] and fctr[2]. if this pin is not used, tie it to vcc or pull it high via a 100k ohm resistor. pin description n ame 44-plcc p in # t ype d escription
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 5 n ote : pin type: i=input, o=output, i/o= input/output, od=output open drain. rtsb# 23 o uart channel b request-to-send (active low) or general purpose output. this port must be asserted prior to using auto rts flow control, see efr[6], mcr[1], fctr[1:0], emsr[5:4] and ier[6]. for auto rs485 half-duplex direction control, see fctr[3]. if this output is not used, leave it unconnected. ctsb# 28 i uart channel b clear-to-send (active low) or general purpose input. it can be used for auto cts flow control, see efr[7], and ier[7]. this input should be connected to vcc when not used. dtrb# 27 o uart channel b data-terminal-ready (active low) or general purpose output. if this output is not used, leave it unconnected. dsrb# 29 i uart channel b data-set-ready (active low) or general purpose input. this input should be connected to vcc when not used. cdb# 30 i uart channel b carrier-detect (active low) or general purpose input. this input should be connected to vcc when not used. rib# 31 i uart channel b ring-indicator (active low) or general purpose input. this input should be connected to vcc when not used. mfb# 19 o multi-function output channel b. this ou tput pin can function as the op2b#, baud - outb#, or rxrdyb# pin. one of these out put signal functions can be selected by the user programmable bits 1-2 of the alte rnate function register (afr). these sig - nal functions are described as follows: 1) op2b# - when op2b# (active low) is selected, the mf# pin is low when mcr bit- 3 is set to a logic 1 (see mcr bit-3). mcr bi t-3 defaults to a logic 0 condition after a reset or power-up. 2) baudoutb# - when baudoutb# function is selected, the 16x baud rate clock output is available at this pin. 3) rxrdyb# - rxrdyb# (active low) is intended for monitoring dma data transfers. see ta b l e 2 on page 9 for more details. if this output is not used, leave it unconnected. ancillary signals xtal1 11 i crystal or external clock input. xtal2 13 o crystal or buffered clock output. reset 21 i reset (active high) - a longer than 40 ns high pulse on this pin will reset the internal registers and all outputs. the uart transmitte r output will be held high, the receiver input will be ignored and outputs are reset during reset period (see ta b l e 16 on page 38 ). vcc 44, 33 pwr 2.97v to 5.5v power supply. all inputs are 5v tolerant for devices with top mark date code of "f2 yyww" and newer. gnd 22, 12 pwr power supply common, ground. pin description n ame 44-plcc p in # t ype d escription
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 6 1.0 product description the xr16c2852 (2852) integrates the functions of 2 enhanced 16c550 universal asynchrounous receiver and transmitter (uart). each uart is independently c ontrolled having its own set of device configuration registers. the configuration registers set is 16550 ua rt compatible for control, status and data transfer. additionally, each uart channel has 128-bytes of tran smit and receive fifos, au tomatic rts/cts hardware flow control with hysteresis contro l, automatic xon/xoff and special character software flow control, programmable transmit and receive fifo trigger levels , fifo level counters, infrared encoder and decoder (irda ver 1.0), programmable baud rate generator with a prescaler of divide by 1 or 4, and data rate up to 3.125 mbps. the xr16c2852 is a 5v and 3.3v device. the 2852 is fabricated with an advanced cmos process. enhanced features the 2852 duart provides a solution that supports 128 bytes of transmit and receive fifo memory, instead of 64 bytes provided in the xr16l2752 and 16 bytes in the st16c2552. the 2852 is designed to work with high performance data communication systems, that require fast data processing time. increased performance is realized in the 2852 by the larger transmit and receive fifos, fifo trigger level c ontrol, fifo level counters and automatic flow control mechanism. this allows th e external processor to handle more networking tasks within a given time. for example, the st 16c2552 with a 16 byte fifo, unloads 16 bytes of receive data in 1.53 ms (this example uses a character length of 11 bits, in cluding start/stop bits at 115.2kbps). this means the external cpu will have to service the receive fifo at 1. 53 ms intervals. however with the 128 byte fifo in the 2852, the data buffer will not require un loading/loading for 12.2 ms. this in creases the service interval giving the external cpu additional time for other applications and reducing the overall uart interrupt servicing time. in addition, the programmable fifo level trigger interr upt and automatic hardware/software flow control is uniquely provided for maximum data throughput perf ormance especially when operating in a multi-channel system. the combination of the above greatly reduces the cpu?s bandwidth requirement, increases performance, and reduces power consumption. the 2852 supports a half-duplex output direction control signaling pin, rts# a/b, to enable and disable the external rs-485 transceiver operation. it automatically s witches the logic state of the output pin to the receive state after the last stop-bit of the last character has been shifted out of the transmitter. after receiving, the logic state of the output pin switches back to the transmit st ate when a data byte is loaded in the transmitter. the auto rs-485 direction control pin is no t activated after reset. to activate the direction control function, user has to set fctr bit-3 to ?1 ?. this pin is normally high for re ceive state, low for transmit state. data rate the 2852 is capable of operation up to 3.125 mbps at 5v with 16x internal sampling clock rate. the device can operate with an external 24 mhz crystal on pins xtal1 and xtal2, or external cl ock source of up to 50 mhz on xtal1 pin. with a typical crystal of 14.7456 mh z and through a software option, the user can set the prescaler bit for data rates of up to 921.6 kbps. the rich feature set of the 2852 is available through th e internal registers. automa tic hardware/software flow control, selectable transmit and receive fifo trigger levels, selectable tx and rx baud rates, infrared encoder/decoder interface, modem interface controls, and a sleep mode are all standard features. following a power on reset or an external reset, the 2852 is software compatible with previous generation of uarts, 16c2552 and 16l2752.
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 7 2.0 functional descriptions 2.1 cpu interface the cpu interface is 8 data bits wide with 3 address li nes and control signals to execute data bus read and write transactions. the 2852 data interface supports the in tel compatible types of cpus and it is compatible to the industry standard 16c550 uart. no clock (oscillator nor external clock) is requir ed to operate a data bus transaction. each bus cycle is asynchronous usi ng chsel, cs#, ior# and iow# signals. both uart channels share the same data bus for host operations. the data bus interconnections are shown in figure 3 . . 2.2 device reset the reset input resets the internal registers and the seri al interface outputs in both channels to their default state (see ta b l e 16 on page 38 ). an active high pulse of longer than 40 ns duration will be required to activate the reset function in the device. 2.3 device identification and revision the xr16c2852 provides a device identification code and a device revision code to distinguish the part from other devices and revisions. to read the identification code from the part, it is required to set the baud rate generator regist ers dll and dlm both to 0x00. now reading the content of the dlm will provide 0x12 for the xr16c2852 and reading th e content of dll will provide th e revision of the part; for example, a reading of 0x01 means revision a. 2.4 channel a and b selection the uart provides the user with the capability to bi-directionally tr ansfer information be tween an external cpu and an external serial communication device. a logic 0 on chip select pin (cs#) allows the user to select the uart and then using the channel select (chsel) pin, the user can select channel a or b to configure, send transmit data and/or unload receive data to/from th e uart. individual channel select functions are shown in ta b l e 1 . f igure 3. xr16c2852 d ata b us i nterconnections vcc vcc (op2a#) dsra# ctsa# rtsa# dtra# rxa txa ria# cda# (op2b#) dsrb# ctsb# rtsb# dtrb# rxb txb rib# cdb# gnd a0 a1 a2 uart_cs# uart_chsel ior# iow# d0 d1 d2 d3 d4 d5 d6 d7 a0 a1 a2 cs# chsel d0 d1 d2 d3 d4 d5 d6 d7 ior# iow# uart channel a uart channel b uart_intb uart_inta intb inta (rxrdya#) txrdya# (rxrdya#) txrdya# (rxrdyb#) txrdyb# (rxrdyb#) txrdyb# uart_reset reset serial interface of rs-232, rs-485 serial interface of rs-232, rs-485 2750int (baudoutb#) (baudouta#) pins in parentheses become available through the mf# pin. mf# a/b becomes rxrdy# a/b when afr[2:1] = '10'. mf# a/b becomes op2 # a/b when afr[2:1] = '00'. mf# a/b becomes baudout# a/b when afr[1:0] = '01'.
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 8 2.5 channel a and b internal registers each uart channel in the 2852 has a set of enhanced registers for control, monitoring and data loading and unloading. the configuration register set is compatib le to those already available in the standard single 16c550 and dual st16c2550. these r egisters function as data holding regi sters (thr/rhr), interrupt status and control registers (isr/ier), a fi fo control register (fcr), receive lin e status and control registers (lsr/ lcr), modem status and control regist ers (msr/mcr), programmable data rate (clock) divisor registers (dll/ dlm), and a user accessible scratchpad register (spr). beyond the general 16c2550 features and capab ilities, the 2852 offers enha nced feature registers (afr, emsr, flvl, efr, xon/xoff 1, xon/ xoff 2, fctr, trg, fc) that provide automatic rts and cts hardware flow control, xon/xoff software fl ow control, automatic rs-485 half-dupl ex direction output enable/disable, fifo trigger level control, fifo level counters, and si multaneous writes to both channels. all the register functions are discussed in full detail later in ?section 3.0, uart internal registers? on page 21 . 2.6 simultaneous write to channel a and b during a write mode cycle, the setting of alternate function register (afr ) bit-0 to a logic 1 will override the chsel selection and allows a simultan eous write to both uart channel se ctions. this functional capability allow the registers in both uart channels to be modified concurrently, saving indivi dual channel initialization time. caution should be considered, ho wever, when using this capability. any in-process seri al data transfer may be disrupted by changing an active channel?s mode. 2.7 dma mode the device does not support direct memory access. th e dma mode (a legacy term) in this document doesn?t mean ?direct memory access? but refers to data block transfer operation. the dma mode affects the state of the rxrdy# a/b (mf# a/b becomes rxrdy# a/b output when afr[2:1] = ?10?) and txrdy# a/b output pins. the transmit and receive fifo trigger levels provide additional fl exibility to the user for block mode operation. the lsr bits 5-6 provide an indication when the transmitter is empty or has an empty location(s) for more data. the user can optionally operate the transmit and receive fifo in the dma mode (fcr bit-3=1). when the transmit and receive fifo are enabled and the dma mode is disabled (fcr bit-3 = 0), the 2852 is placed in single-character mode for data transmit or receive operation. when dma mode is enabled (fcr bit- 3 = 1), the user takes advantage of block mode opera tion by loading or unloading the fifo in a block sequence determined by the programmed trigger level. in this mode, the 2852 sets the txrdy# pin when the transmit fifo becomes full, and sets the rxrdy# pi n when the receive fifo becomes empty. the following table shows their behavior. also see figures 20 through 25 . t able 1: c hannel a and b s elect cs# chsel f unction 1 x uart de-selected 0 1 channel a selected 0 0 channel b selected
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 9 2.8 inta and intb ouputs the inta and intb interrupt output changes according to the operating mode and enahnced features setup. ta b l e 3 and 4 summarize the operating behavior for the transmitter and receiver. also see figures 20 through 25 . 2.9 crystal oscillator or external clock input the 2852 includes an on-chip oscillator (xtal1 and xt al2) to produce a clock for both uart sections in the device. the cpu data bus does not require this clock for bus operation. the crystal oscillator provides a system clock to the baud rate generators (brg) section found in each of the uart. xtal1 is the input to the oscillator or external clock buffer input with xtal 2 pin being the output. fo r programming details, see ?programmable baud rate generator.? t able 2: txrdy# and rxrdy# o utputs in fifo and dma m ode p ins fcr bit -0=0 (fifo d isabled ) fcr b it -0=1 (fifo e nabled ) fcr b it -3 = 0 (dma m ode d isabled ) fcr b it -3 = 1 (dma m ode e nabled ) rxrdy# a/b low = 1 byte high = no data low = at least 1 byte in fifo high = fifo empty high to low transition when fifo reaches the trigger level, or timeout occurs. low to high transition when fifo empties. txrdy# a/b low = thr empty high = byte in thr low = fifo empty high = at least 1 byte in fifo low = fifo has at least 1 empty location high = fifo is full t able 3: inta and intb p ins o peration for t ransmitter auto rs485 mode fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) inta/b pin no low = a byte in thr high = thr empty low = fifo above trigger level high = fifo below trigger level or fifo empty inta/b pin yes low = a byte in thr high = transmitter empty low = fifo above trigger level high = fifo below trigger level or transmitter empty t able 4: inta and intb p in o peration f or r eceiver fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) inta/b pin low = no data high = 1 byte low = fifo below trigger level high = fifo above trigger level
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 10 f igure 4. t ypical oscillator connections the on-chip oscillator is designed to use an industry standard micropro cessor crystal (p arallel resonant, fundamental frequency with 10-22 pf capacitance load, esr of 20-120 ohms and 100ppm frequency tolerance) connected externally betw een the xtal1 and xtal2 pins (see figure 4 ). alternatively, an external clock can be connected to the xtal1 pin to clock the internal baud rate generator for standard or custom rates. typical oscillator connections are shown in figure 4 . for further reading on oscillator circuit please see application note dan108 on exar?s web site. 2.10 programmable baud rate generator a single baud rate generator (brg) is provided for the transmitter and receiver, allowing independent tx/rx channel control. the programmable baud rate generator is capable of operating with a crystal frequency of up to 24 mhz. however, with an external clock input on xtal1 pin and a 2k ohms pull-up resistor on xtal2 pin (as shown in figure 5 ) it can extend its operation up to 50 mhz (3.125 mbps serial data rate) at room temperature and 5.0v. f igure 5. e xternal c lock c onnection for e xtended d ata r ate each uart also has their own prescaler along with the brg. the prescaler is controlled by a software bit in the mcr register. the mcr register bit-7 sets the prescaler to divide the input crystal or external clock by 1 or 4. the clock output of the prescaler goes to the brg. the brg further divides this clock by a programmable c1 22-47 pf c2 22-47 pf y1 1.8432 mhz to 24 mhz r1 0-120 ? (optional) r2 500 ? ? 1 ? xtal1 xtal2 2k xtal1 xtal2 r1 vcc external clock vcc gnd
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 11 divisor between 1 and (2 16 -1) to obtain a 16x sampling rate clock of the serial data rate. the sampling rate clock is used by the transmi tter for data bit shifting and receiver for data sampling. programming the ba ud rate generator regi sters dlm and dll provides th e capability of selecting the operating data rate. ta b l e 5 shows the standard data rates available with a 14.7456 mhz crystal or external clock at 16x sampling rate clock rate. when using a non-standard data rate crystal or external clock, the divisor value can be calculated fo r dll/dlm with the following equation. 2.11 transmitter the transmitter section comp rises of an 8-bit transmit shift register (tsr) and 128 bytes of fifo which includes a byte-wide transmit holding register (thr). tsr shifts out every data bit with the 16x internal clock. a bit time is 16 clock periods. the transmitter se nds the start-bit followed by the number of data bits, inserts the proper parity-bit if enabled, and adds the stop -bit(s). the status of the fifo and tsr are reported in the line status register (lsr bit-5 and bit-6). f igure 6. b aud r ate g enerator and p rescaler divisor (decimal) = (xtal1 clock frequency / prescaler) / (serial data rate x 16) t able 5: t ypical data rates with a 14.7456 mh z crystal or external clock o utput data rate mcr bit-7=1 o utput data rate mcr bit-7=0 (d efault ) d ivisor for 16x clock (decimal) d ivisor for 16x clock (hex) dlm p rogram v alue (hex) dll p rogram v alue (hex) d ata r ate e rror (%) 100 400 2304 900 09 00 0 600 2400 384 180 01 80 0 1200 4800 192 c0 00 c0 0 2400 9600 96 60 00 60 0 4800 19.2k 48 30 00 30 0 9600 38.4k 24 18 00 18 0 19.2k 76.8k 12 0c 00 0c 0 38.4k 153.6k 6 06 00 06 0 57.6k 230.4k 4 04 00 04 0 115.2k 460.8k 2 02 00 02 0 230.4k 921.6k 1 01 00 01 0 xtal1 xtal2 crystal osc/ buffer mcr bit-7=0 (default) mcr bit-7=1 dll and dlm registers prescaler divide by 1 prescaler divide by 4 16x sampling rate clock to transmitter baud rate generator logic
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 12 2.11.1 transmit holding re gister (thr) - write only the transmit holding register is an 8-bit register pr oviding a data interface to the host processor. the host writes transmit data byte to the thr to be converted in to a serial data stream including start-bit, data bits, parity-bit and stop-bit(s). the least-si gnificant-bit (bit-0) becomes first data bit to go out. the thr is the input register to the transmit fifo of 128 bytes when fifo operation is enabled by fcr bit-0. every time a write operation is made to the thr, the fifo data pointer is automatically bumped to the next sequential data location. 2.11.2 transmitter operation in non-fifo mode the host loads transmit data to thr one character at a time. the thr empty flag (lsr bit-5) is set when the data byte is transferred to tsr. thr flag can generate a tr ansmit empty interrupt (isr bit-1) when it is enabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr beco mes completely empty. 2.11.3 transmitter operation in fifo mode the host may fill the transmit fifo with up to 128 bytes of transmit data. the thr empty flag (lsr bit-5) is set whenever the fifo is empty. the thr empty flag can ge nerate a transmit empty interrupt (isr bit-1) when the amount of data in the fifo falls below its programmed tr igger level. the transmit em pty interrupt is enabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr/fifo becomes empty. f igure 7. t ransmitter o peration in non -fifo m ode transmit holding register (thr) transmit shift register (tsr) data byte l s b m s b thr interrupt (isr bit-1) enabled by ier bit-1 txnofifo1 16x clock
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 13 2.12 receiver the receiver section contains an 8-bit receive shift re gister (rsr) and 128 bytes of fifo which includes a byte-wide receive holding regi ster (rhr). the rsr uses the 16x for ti ming. it verifies and validates every bit on the incoming character in the middle of each data bit. on the falling edge of a start or false start bit, an internal receiver counter star ts counting at the 16x. after 8 clocks the start bit period should be at the center of the start bit. at this time the start bit is sampled and if it is still a logic 0 it is validated. evaluati ng the start bit in this manner prevents the receiver from assembling a false ch aracter. the rest of the data bits and stop bits are sampled and validated in this same manner to prevent false framing. if there were any error(s), they are reported in the lsr register bits 2-4. upon unloading the receive data byte from rhr, the receive fifo pointer is bumped and the error tags are immediately updated to reflect the status of the data byte in rhr register. rhr can generate a receive data ready interrupt upon receiv ing a character or delay until it reaches the fifo trigger level. furthermore, data delivery to the host is guaranteed by a receive data ready time-out interrupt when data is not received for 4 word lengths as defined by lcr[1:0] plus 12 bits ti me. this is equivalent to 3.7- 4.6 character times. the rhr interrupt is enabled by ier bit-0. 2.12.1 receive holding register (rhr) - read-only the receive holding register is an 8-bit register that holds a receive data byte from the receive shift register. it provides the receive data interface to the host processor. the rhr register is part of the receive fifo of 128 bytes by 11-bits wide, the 3 extra bits are fo r the 3 error tags to be reported in lsr register. when the fifo is enabled by fcr bit-0, the rhr contains th e first data character received by the fifo. after the rhr is read, the next character byte is loaded into the rhr and the errors associated with the current data byte are immediately updated in the lsr bits 2-4. f igure 8. t ransmitter o peration in fifo and f low c ontrol m ode transmit data shift register (tsr) transmit data byte thr interrupt (isr bit-1) falls below the programmed trigger level and then when becomes empty. fifo is enabled by fcr bit-0=1 transmit fifo 16x clock auto cts flow control (cts# pin) auto software flow control flow control characters (xoff1/2 and xon1/2 reg. txfifo1
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 14 n ote : table-b selected as trigger table for figure 10 ( table 10 on page 27 ). f igure 9. r eceiver o peration in non -fifo m ode f igure 10. r eceiver o peration in fifo and a uto rts f low c ontrol m ode receive data shift register (rsr) receive data byte and errors rhr interrupt (isr bit-2) receive data holding register (rhr) rxfifo1 16x clock receive data characters data bit validation error tags in lsr bits 4:2 receive data shift register (rsr) rxfifo1 16x clock error tags (128-sets) error tags in lsr bits 4:2 128 bytes by 11-bit wide fifo receive data characters fifo trigger=16 example: - rx fifo trigger level selected at 16 bytes (see note below) data fills to 24 data falls to 8 data bit validation receive data fifo receive data receive data byte and errors rhr interrupt (isr bit-2) programmed for desired fifo trigger level. fifo is enabled by fcr bit-0=1 rts# de-asserts when data fills above the flow control trigger level to suspend remote transmitter. enable by efr bit-6=1, mcr bit-2. rts# re-asserts when data falls below the flow control trigger level to restart remote transmitter. enable by efr bit-6=1, mcr bit-2.
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 15 2.13 auto rts (hardware) flow control automatic rts hardware flow control is used to prevent data overrun to the local receiver fifo. the rts# output is used to request remote unit to suspend/r esume data transmission. the auto rts flow control features is enabled to fit specific application requirement (see figure 11 ): ? enable auto rts flow control using efr bit-6. ? the auto rts function must be started by asserting rts output pin (mcr bit-1 to logic 1 after it is enabled). with the auto rts function enabled , the rts# output pin will not be de-asserted (logi c 1) when the receive fifo reaches the progr ammed trigger level, but will be de-asserted when the fifo reaches the next trigger level ( see table 10 ). the rts# output pin will be asserted again af ter the fifo is unloade d to the next trigger level below the programmed trigger le vel. however, even under these c onditions, the 2852 will continue to accept data until the receive fifo is full if the remote uart transmitter continues to send data. ? enable rts interrupt through ier bit-6 (after setting efr bit-4). the uart issues an interrupt when the rts# pin is de-asserted (low) during auto rts fl ow control mode: isr bit-5 will be set to logic 1. 2.14 auto rts hysteresis the 2852 has a new feature that provid es flow control trigger hysteresis while maintaining compatibility with the xr16c850, st16c650a and st16c550 family of ua rts. with the auto rts function enabled, an interrupt is genera ted when the receive fifo reaches the prog rammed rx trigger level. the rts# pin will not be forced high (rts off) until the receive fifo reaches the upper limit of the hysteresis level. the rts# pin will return low after the rx fifo is unloaded to the lower limit of the hysteresis level. under the above described conditions, the 2 852 will continue to accept data until the re ceive fifo gets full. the auto rts function is initiated when the rts# ou tput pin is asserted low (rts on). ta b l e 13 shows the complete details for the auto rts# hysteresis le vels. please note that this table is for programmable trigger levels only (table d). the hysteresis values for tables a-c are the next higher and next lower trigger levels in the corresponding table. 2.15 auto cts flow control automatic cts flow control is used to prevent data overrun to the remote receiver fifo. the cts# input is monitored to suspend/restart the local transmitter. the aut o cts flow control feature is selected to fit specific application requirement (see figure 11 ): ? enable auto cts flow control using efr bit-7. with the auto cts function enabled, the uart will suspend transmission as soon as the stop bit of the character in the transmit shift register has been shifted out. transmission is resumed after the cts# input is re-asserted (logic 0), indicating more data may be sent. ? enable cts interrupt through ier bit-7 (after setting efr bit-4). the uart issues an interrupt when the cts# pin is de-asserted (logic 1) during auto cts flow control mode: isr bit-5 will be set to 1.
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 16 f igure 11. a uto rts and cts f low c ontrol o peration the local uart (uarta) starts data transfer by asserting rtsa# (1). rtsa# is normally connected to ctsb# (2) of remote uart (uartb). ctsb# allows its transmitter to se nd data (3). txb data arrives and fills uarta receive fifo (4). when rxa data fills up to its receive fifo trigger le vel, uarta activates its rxa data ready interrupt (5) and con - tinues to receive and put data into it s fifo. if interrupt service latency is l ong and data is not being unloaded, uarta monitors its receive data fill level to match the upper th reshold of rts delay and de-assert rtsa# (6). ctsb# follows (7) and request uartb transmitter to suspend data transfer. ua rtb stops or finishes sending the data bits in its trans - mit shift register (8). when receive fifo data in uarta is unloaded to match the lower threshold of rts delay (9), uarta re-asserts rtsa# (10), ctsb# recognizes the change (11) and restarts its transmitter and data flow again until next receive fifo trigger (12). this same event applies to the reverse direction when uarta sends data to uartb with rtsb# and ctsa# controlling the data flow. rtsa# ctsb# rxa txb transmitter receiver fifo trigger reached auto rts trigger level auto cts monitor rtsa# txb rxa fifo ctsb# remote uart uartb local uart uarta on off on suspend restart rts high threshold data starts on off on assert rts# to begin transmission 1 2 3 4 5 6 7 receive data rts low threshold 9 10 11 receiver fifo trigger reached auto rts trigger level transmitter auto cts monitor rtsb# ctsa# rxb txa inta (rxa fifo interrupt) rx fifo trigger level rx fifo trigger level 8 12 rtscts1
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 17 2.16 auto xon/xoff (software) flow control when software flow control is enabled ( see table 15 ), the 2852 compares one or two sequential receive data characters with the programmed xon or xoff-1,2 character value(s). if receive character(s) (rx) match the programmed values, the 2852 will halt transmission (tx) as soon as the current char acter has completed transmission. when a match occurs, the xoff (if enabled vi a ier bit-5) flag will be set and the interrupt output pin will be activated. following a suspen sion due to a ma tch of the xoff character, the 2852 will monitor the receive data stream for a match to the xon-1,2 character. if a match is found, the 2852 will resume operation and clear the flags (isr bit-4). reset initially sets the contents of the xon/xoff 8-bit flow control registers to a logic 0. following reset the user can write any xon/xoff value desired for software flow c ontrol. different conditions can be set to detect xon/ xoff characters ( see table 15 ) and suspend/resume transmissions. when double 8-bit xon/xoff characters are selected, the 2852 compares two consecutive receive ch aracters with two software flow control 8-bit values (xon1, xon2, xoff1, xoff2) and controls tx transmissi ons accordingly. under the above described flow control mechanisms, flow control characters are not placed (sta cked) in the user accessible rx data buffer or fifo. in the event that the receive buffer is overfilling and flow control needs to be executed, the 2852 automatically sends an xoff message (when enabled) via the serial tx output to the remote modem. the 2852 sends the xoff-1,2 characters two character times (= time taken to send two characters at the programmed baud rate) after the receive fifo crosses the programmed trigger level (for all trigger tables a-d). to clear this condition, the 2852 will transmit the program med xon-1,2 characters as soon as re ceive fifo is less than one trigger level below the programmed trigger level (for trigger tables a, b, and c) or when rece ive fifo is less than the trigger level minus the hysteresis value (for trigger tabl e d). this hysteresis value is the same as the auto rts hysteresis value in table 13 . table 6 below explains this when trigger table-b (see ta b l e 10 ) is selected. * after the trigger level is reached, an xoff character is se nt after a short span of time (= time required to send 2 characters); for example, after 2.083ms has el apsed for 9600 baud and 10-bit word length setting. 2.17 special character detect a special character detect feature is provided to detect an 8-bit character when bit-5 is set in the enhanced feature register (efr). when this character (xoff2) is detected, it will be placed in the fi fo along with normal incoming rx data. the 2852 compares each incoming receive character wi th xoff-2 data. if a match exists, the received data will be transferred to fifo and isr bit-4 will be set to indica te detection of special character. although the internal register table shows xon, xoff registers with eight bits of character information, the actual number of bits is dependent on the programmed word lengt h. line control register (lcr) bits 0-1 defines the number of character bits, i.e., either 5 bits, 6 bits, 7 bits, or 8 bits. the word length selected by lcr bits 0-1 also determines the number of bits that will be used for the special character comparison. bit-0 in the xon, xoff registers corresponds with the lsb bit for the receive character. 2.18 auto rs485 half-duplex control the auto rs485 half-duplex direction control changes the behavior of the transmitter when enabled by fctr bit-3. it de-asserts rts# output (high) following the last stop bit of the last character that has been transmitted. this helps in turning around the transcei ver to receive the remote st ation?s response. when the t able 6: a uto x on /x off (s oftware ) f low c ontrol rx t rigger l evel int p in a ctivation x off c haracter ( s ) s ent ( characters in rx fifo ) x on c haracter ( s ) s ent ( characters in rx fifo ) 8 8 8* 0 16 16 16* 8 24 24 24* 16 28 28 28* 24
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 18 host is ready to transmit next polling data packet again, it only has to load data bytes to the transmit fifo. the transmitter automatically re-asserts rts# output (low) prior sending the data. 2.19 infrared mode the 2852 uart includes the infrared encoder and decoder compatible to the irda (i nfrared data association) version 1.0. the irda 1.0 standard that stipulates the infrared encoder sends out a 3/16 of a bit wide high- pulse for each ?0? bit in the transmit data stream. this signal encoding reduces the on- time of the infrared led, hence reduces the power consumption. see figure 12 below. the infrared encoder and decoder are enabled by setting m cr register bit-6 to a ?1?. when the infrared feature is enabled, the transmit data output, tx, idles at logic zero level. likewise, the rx input assumes an idle level of logic zero from a reset and power up, see figure 12 . typically, the wireless infrared decoder receives the input pulse from the infrared sensing diode on the rx pin. each time it senses a light pulse, it returns a logic 1 to the data bit stream. however, this is not true with some infrared modules on the market which indicate a logic 0 by a light pulse. so the 2852 has a provision to invert the input polarity to accomodate this. in this case user can enable fctr bit-2 to invert the input signal. f igure 12. i nfrared t ransmit d ata e ncoding and r eceive d ata d ecoding character data bits start stop 0000 0 11 111 bit time 1/16 clock delay irdecoder- rx data receive ir pulse (rx pin) character data bits start stop 0000 0 11 111 tx data transmit ir pulse (tx pin) bit time 1/2 bit time 3/16 bit time irencoder-1
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 19 2.20 sleep mode with auto wake-up the 2852 supports low voltage system designs, hence, a sleep mode is included to reduce its power consumption when the chip is not actively used. all of these conditions must be sati sfied for the 2852 to enter sleep mode: no interrupts pending for both channels of the 2852 (isr bit-0 = 1) sleep mode of both channels are enabled (ier bit-4 = 1) modem inputs are not toggling (msr bits 0-3 = 0) rx input pin of both channels are idling at a logic 1 the 2852 stops its crystal oscillator to conserve power in the sleep mode . user can check the xtal2 pin for no clock output as an indication that the device has entered the sleep mode. the 2852 resumes normal operation by any of the following: a receive data start bit transition (high to low) a data byte is loaded to the transmitter, thr or fifo a change of logic state on any of the modem or general purpose serial inputs: cts#, dsr#, cd#, ri# if the 2852 is awakened by any one of the above conditions, it will return to the sleep mode automatically after all interrupting conditions have been serviced and cleare d. if the 2852 is awakened by the modem inputs, a read to the msr is required to re set the modem inputs. in any case, t he sleep mode will not be entered while an interrupt is pending from channel a or b. t he 2852 will stay in the sleep mode of operation until it is disabled by setting ier bit-4 to a logic 0. if the address lines, data bus lines, iow#, ior#, chsel, cs #, and modem input lines remain steady when the 2852 is in sleep mode, the maximum current will be in the microamp range as specified in the dc electrical characteristics on page 39 . if the input lines are floating or are toggling while the 2852 is in sleep mode, the current can be up to 100 times more. if any of those signals are toggling or floating, then an external buffer would be required to keep the address, data and control lines steady to achieve the low current. a word of caution: owing to the star ting up delay of the crystal oscillato r after waking up from sleep mode, the first few receive characters may be lost. the number of ch aracters lost during the restart also depends on your operating data rate. more characters are lost when operati ng at higher data rate. also, it is important to keep rx a/b inputs idling high or ?mar king? condition during sleep mode to avoid receiving a ?break? condition upon the restart. this may occur when the external inte rface transceivers (rs-232, rs-485 or another type) are also put to sleep mode and cannot maintain the ?mar king? condition. to avoid this, the designer can use a 47k-100k ohm pull-up resistor on the rxa and rxb pins.
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 20 2.21 internal loopback the 2852 uart provides an intern al loopback capability for system di agnostic purposes . the internal loopback mode is enabled by setting mcr register bit-4 to logi c 1. all regular uart functions operate normally. figure 13 shows how the modem port signals are re-configured. transmit data from the transmit shift register output is internally routed to the receive shift register input allowing the system to re ceive the same data that it was sending. the tx pin is held high or mark condition while rts# and dtr# are de-asserted, and cts#, dsr# cd# and ri# inputs are ignored. caution: the rx input must be held high during loopback test else upon exiting the loopback test the uart may detect and report a false ?break? signal. f igure 13. i nternal l oop b ack in c hannels a and b txa/txb rxa/rxb modem / general purpose control logic internal data bus lines and control signals rtsa#/rtsb# mcr bit-4=1 vcc vcc transmit shift register (thr/fifo) receive shift register (rhr/fifo) ctsa#/ctsb dtra#/dtrb# dsra#/dsrb# ria#/rib# cda#/cdb# op1# op2# rts# cts# dtr# dsr# ri# cd# vcc
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 21 3.0 uart internal registers each of the uart channel in the 2852 has its own set of configuration registers selected by address lines a0, a1 and a2 with cs# and chsel selecting the chan nel. the complete register set is shown in ta b l e 7 and ta b l e 8 . t able 7: uart channel a and b uart internal registers a2,a1,a0 a ddresses r egister r ead /w rite c omments 16c550 c ompatible r egisters 0 0 0 rhr - receive holding register thr - transmit holding register read-only write-only lcr[7] = 0 0 0 0 dll - div latch low byte read/write lcr[7] = 1 lcr 0xbf 0 0 1 dlm - div latch high byte read/write 0 1 0 afr - alternate function register read/write 0 0 0 drev - device revision code read-only dll, dlm = 0x00 lcr[7] = 1 lcr 0xbf 0 0 1 dvid - device identification code read-only 0 0 1 ier - interrupt enable register read/write lcr[7] = 0 0 1 0 isr - interrupt status register fcr - fifo control register read-only write-only 0 1 1 lcr - line control register read/write 1 0 0 mcr - modem control register read/write lcr[7] = 0 1 0 1 lsr - line status register reserved read-only write-only 1 1 0 msr - modem status register reserved read-only write-only 1 1 1 spr - scratch pad register read/write lcr[7] = 0 fctr[6] = 0 1 1 1 flvl - tx/rx fifo level counter register read-only lcr[7] = 0 fctr[6] = 1 1 1 1 emsr - enhanced mode select register write-only e nhanced r egisters 0 0 0 trg - tx/rx fifo trigger level register fc - tx/rx fifo level counter register write-only read-only lcr = 0xbf 0 0 1 fctr - feature control reg read/write 0 1 0 efr - enhanced function reg read/write 1 0 0 xon-1 - xoff character 1 read/write 1 0 1 xon-2 - xoff character 2 read/write 1 1 0 xoff-1 - xon character 1 read/write 1 1 1 xoff-2 - xon character 2 read/write
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 22 . t able 8: internal registers description. s haded bits are enabled when efr b it -4=1 a ddress a2-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment 16c550 compatible registers 0 0 0 rhr rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 0 0 0 0 thr wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 0 1 ier rd/wr 0/ 0/ 0/ 0/ modem stat. int. enable rx line stat. int. enable tx empty int enable rx data int. enable cts int. enable rts int. enable xoff int. enable sleep mode enable 0 1 0 isr rd fifos enabled fifos enabled 0/ 0/ int source bit-3 int source bit-2 int source bit-1 int source bit-0 int source bit-5 int source bit-4 0 1 0 fcr wr rx fifo trigger rx fifo trigger 0/ 0/ dma mode enable tx fifo reset rx fifo reset fifos enable tx fifo trigger tx fifo trigger 0 1 1 lcr rd/wr divisor enable set tx break set par - ity even parity parity enable stop bits word length bit-1 word length bit-0 1 0 0 mcr rd/wr 0/ 0/ 0/ internal lopback enable op2# output control rsvd (op1#) rts# output control dtr# output control lcr[7] = 0 brg pres - caler ir mode enable xonany 1 0 1 lsr rd rx fifo global error thr & tsr empty thr empty rx break rx fram - ing error rx parity error rx over - run error rx data ready 1 1 0 msr rd cd# input ri# input dsr# input cts# input delta cd# delta ri# delta dsr# delta cts# 1 1 1 spr rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 0 fctr bit- 6=0 1 1 1 emsr wr rsvd rsvd auto rts hyst. bit-3 auto rts hyst. bit-2 rsvd rsvd rx/tx fifo count rx/tx fifo count lcr[7] = 0 fctr bit- 6=1 1 1 1 flvl rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 23 4.0 internal register descriptions 4.1 receive holding register (rhr) - read- only see ?receiver? on page 13. 4.2 transmit holding regi ster (thr) - write-only see ?transmitter? on page 11. 4.3 interrupt enable register (ier) - read/write the interrupt enable register (ier) masks the interrupts from receive data ready, transmit empty, line status and modem status registers. these interrupts are r eported in the interrupt status register (isr). baud rate generator divisor 0 0 0 dll rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf 0 0 1 dlm rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 1 0 afr rd/wr rsvd rsvd rsvd rsvd rsvd rxrdy# select baudout# select concur - rent write 0 0 0 drev rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf dll=0x00 dlm=0x00 0 0 1 dvid rd 0 0 0 1 0 0 1 0 enhanced registers 0 0 0 trg wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr=0 x bf 0 0 0 fc rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 0 1 fctr rd/wr rx/tx mode scpad swap trig ta b l e bit-1 trig ta b l e bit-0 auto rs485 direction control rx ir input inv. auto rts hyst bit-1 auto rts hyst bit-0 0 1 0 efr rd/wr auto cts enable auto rts enable special char select enable ier [7:4], isr [5:4], fcr[5:4], mcr[7:5] soft- ware flow cntl bit-3 soft - ware flow cntl bit-2 soft - ware flow cntl bit-1 soft - ware flow cntl bit-0 1 0 0 xon1 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 0 1 xon2 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 0 xoff1 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 1 xoff2 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 t able 8: internal registers description. s haded bits are enabled when efr b it -4=1 a ddress a2-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 24 4.3.1 ier versus receive fifo interrupt mode operation when the receive fifo (fcr bit-0 = 1) and receive inte rrupts (ier bit-0 = 1) are enabled, the rhr interrupts (see isr bits 2 and 3) status will reflect the following: a. the receive data available interrupts are issued to the host when the fifo has reached the programmed trigger level. it will be cleared when the fifo drops below the programmed trigger level. b. fifo level will be reflected in the isr register when the fifo trigger level is reached. both the isr register status bit and the interrupt will be cleared wh en the fifo drops below the trigger level. c. the receive data ready bit (lsr bit-0) is set as soon as a character is transferred from the shift register to the receive fifo. it is rese t when the fifo is empty. 4.3.2 ier versus receive/transmit fifo polled mode operation when fcr bit-0 equals a logic 1 for fifo enable; rese tting ier bits 0-3 enables the xr16c2852 in the fifo polled mode of operation. since the receiver and transmitter have separate bits in the lsr either or both can be used in the polled mode by selecting respective transmit or receive control bit(s). a. lsr bit-0 indicates there is data in rhr or rx fifo. b. lsr bit-1 indicates an overrun error has occurred and that data in the fifo may not be valid. c. lsr bit 2-4 provides the type of receive data erro rs encountered for the data byte in rhr, if any. d. lsr bit-5 indicates thr is empty. e. lsr bit-6 indicates when both the transmit fifo and tsr are empty. f. lsr bit-7 indicates a data error in at least one character in the rx fifo. ier[0]: rhr interrupt enable the receive data ready interrupt will be issued when rhr has a data character in th e non-fifo mode or when the receive fifo has reached the programmed trigger level in the fifo mode. ? logic 0 = disable the receive data ready interrupt (default). ? logic 1 = enable the receiver data ready interrupt. ier[1]: thr interrupt enable this bit enables the transmit ready interrupt which is issued whenever the thr becomes empty in the non- fifo mode or when data in the fifo fa lls below the programmed trigger level in the fifo mode. if the thr is empty when this bit is enabled , an interrupt will be generated. ? logic 0 = disable transmit ready interrupt (default). ? logic 1 = enable transmit ready interrupt. ier[2]: receive line status interrupt enable if any of the lsr register bits 1, 2, 3 or 4 is a logic 1, it will generate an interrupt to inform the host controller about the error status of the current data byte in fifo . lsr bits 1-4 generate an interrupt immediately when the character has been received. ? logic 0 = disable the receiver line status interrupt (default). ? logic 1 = enable the receiver line status interrupt. ier[3]: modem status interrupt enable ? logic 0 = disable the modem status register interrupt (default). ? logic 1 = enable the modem status register interrupt. ier[4]: sleep mode enable (requires efr bit-4 = 1) ? logic 0 = disable sleep mode (default). ? logic 1 = enable sleep mode. see sleep mode section for further details.
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 25 ier[5]: xoff interrupt enable (requires efr bit-4=1) ? logic 0 = disable the software flow cont rol, receive xoff interrupt (default). ? logic 1 = enable the software flow control, receive xoff interrupt. see software flow control section for details. ier[6]: rts# output interrupt enable (requires efr bit-4=1) ? logic 0 = disable the rts# interrupt (default). ? logic 1 = enable the rts# interrupt. the uart issues an interrupt when the rts# pin makes a transition from low to high. ier[7]: cts# input interrupt enable (requires efr bit-4=1) ? logic 0 = disable the cts# interrupt (default). ? logic 1 = enable the cts# interrupt. the uart issues an interrupt when cts# pin makes a transition from low to high. 4.4 interrupt status register (isr) - read-only the uart provides multiple levels of prioritized interrupts to minimize external software interaction. the interrupt status register (isr) provides the user with six interrupt status bits. performing a read cycle on the isr will give the user the current hi ghest pending interrupt level to be se rviced, others are queued up to be serviced next. no other interrupts are acknowledged until the pending interrupt is serviced. the interrupt source table, ta b l e 9 , shows the data values (bit 0-5) for the interr upt priority levels and the interrupt sources associated with each of these interrupt levels. 4.4.1 interrupt generation: ? lsr is by any of the lsr bits 1, 2, 3 and 4. ? rxrdy is by rx trigger level. ? rxrdy time-out is by a 4-char plus 12 bits delay timer. ? txrdy is by tx trigger level or tx fifo empty (or transmitter empty in auto rs-485 control). ? msr is by any of the msr bits 0, 1, 2 and 3. ? receive xoff/special character is by det ection of a xoff or special character. ? cts# is when its transmitter toggles the input pin (from low to high) during auto cts flow control enabled by efr bit-7. ? rts# is when its receiver toggles th e output pin (from low to high) during auto rts flow control enabled by efr bit-6. 4.4.2 interrupt clearing: ? lsr interrupt is cleared by a read to the lsr register (b ut flags and tags not cleared until character(s) that generated the interrupt(s) has been emptied or cleared from fifo). ? rxrdy interrupt is cleared by reading data until fifo fa lls below the trigger level. ? rxrdy time-out interrupt is cleared by reading rhr. ? txrdy interrupt is cleared by a read to the isr register or writing to thr. ? msr interrupt is cleared by a read to the msr register. ? xoff interrupt is cleared by a read to isr or when xon character(s) is received. ? special character interrupt is cleared by a read to isr or after the next character is received. ? rts# and cts# flow control interrupts are cleared by a read to the msr register.
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 26 ] isr[0]: interrupt status ? logic 0 = an interrupt is pending and the isr contents may be used as a pointer to the appropriate interrupt service routine. ? logic 1 = no interrupt pending (default condition). isr[5:1]: interrupt status these bits indicate the source for a pending interrupt at interrupt priority levels (see ta b l e 9 ). see ?section 4.4.1, interrupt generation:? on page 25 and ?section 4.4.2, interrupt clearing:? on page 25 for details. isr[7:6]: fifo enable status these bits are set to a logic 0 when the fifos are disa bled. they are set to a logic 1 when the fifos are enabled. 4.5 fifo control register (fcr) - write-only this register is used to enable the fifos, clear the fi fos, set the transmit/receive fifo trigger levels, and select the dma mode. the dma, and fifo modes are defined as follows: fcr[0]: tx and rx fifo enable ? logic 0 = disable the transmit and receive fifo (default). ? logic 1 = enable the transmit and receive fifos. this bit must be set to logic 1 when other fcr bits are written or they will not be programmed. fcr[1]: rx fifo reset this bit is only active when fcr bit-0 is a ?1?. ? logic 0 = no receive fifo reset (default) ? logic 1 = reset the receive fifo pointers and fifo le vel counter logic (the rece ive shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. fcr[2]: tx fifo reset this bit is only active when fcr bit-0 is a ?1?. ? logic 0 = no transmit fifo reset (default). ? logic 1 = reset the transmit fifo pointers and fifo le vel counter logic (the transmit shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. t able 9: i nterrupt s ource and p riority l evel p riority isr r egister s tatus b its s ource of interrupt l evel b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 1 0 0 0 1 1 0 lsr (receiver line status register) 2 0 0 1 1 0 0 rxrdy (receive data time-out) 3 0 0 0 1 0 0 rxrdy (received data ready) 4 0 0 0 0 1 0 txrdy (transmit ready) 5 0 0 0 0 0 0 msr (modem status register) 6 0 1 0 0 0 0 rxrdy (received xoff or special character) 7 1 0 0 0 0 0 cts#, rts# change of state - 0 0 0 0 0 1 none (default)
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 27 fcr[3]: dma mode select controls the behavior of the txrdy# and rxrdy# pins. see dma operation section for details. ? logic 0 = normal operation (default). ? logic 1 = dma mode. fcr[5:4]: transmit fifo trigger select (logic 0 = default, tx trigger level = 1) these 2 bits set the trigger level for the transmit fifo. the uart will issue a transmit interrupt when the number of characters in the fifo falls below the selected trigger level, or when it gets empty in case that the fifo did not get filled over the trigger level on last re-load. ta b l e 10 below shows the selections. efr bit-4 must be set to ?1? before these bits can be accessed. note that the receiver and the transmitter cannot use different trigger tables. whichever selection is made last applies to both the rx and tx side. fcr[7:6]: receive fifo trigger select (logic 0 = default, rx trigger level =1) the fctr bits 5-4 are associated with these 2 bits. these 2 bits are used to set the trigger level for the receive fifo. the uart will issue a receive in terrupt when the number of the char acters in the fifo crosses the trigger level. ta b l e 10 shows the complete selections. note that the receiver and the transmitter cannot use different trigger tables. whichever selection is made last applies to both the rx and tx side. t able 10: t ransmit and r eceive fifo t rigger t able and l evel s election t rigger t able fctr b it -5 fctr b it -4 fcr b it -7 fcr b it -6 fcr b it -5 fcr bit -4 r eceive t rigger l evel t ransmit t rigger l evel c ompatibility ta b l e - a 0 0 0 0 1 1 0 1 0 1 0 0 1 (default) 4 8 14 1 (default) 16c550, 16c2550, 16c2552, 16c554, 16c580 ta b l e - b 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 24 28 16 8 24 30 16c650a table-c 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 56 60 8 16 32 56 16c654 table-d 1 1 x x x x programmable via trg register. fctr[7] = 0. programmable via trg register. fctr[7] = 1. 16l2752, 16l2750, 16c2850, 16c850, 16c854, 16c864
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 28 4.6 line control register (lcr) - read/write the line control register is used to specify the asynchronous data communication format. the word or character length, the number of stop bits, and the parity are selected by writing the appropriate bits in this register. lcr[1:0]: tx and rx word length select these two bits specify the word length to be transmitted or received. lcr[2]: tx and rx stop-bit length select the length of stop bit is specified by this bi t in conjunction with the programmed word length. lcr[3]: tx and rx parity select parity or no parity can be selected via this bit. the pa rity bit is a simple way used in communications for data integrity check. see ta b l e 11 for parity selection summary below. ? logic 0 = no parity. ? logic 1 = a parity bit is generated during the transmissi on while the receiver checks for parity error of the data character received. lcr[4]: tx and rx parity select if the parity bit is enabled with lcr bit-3 set to a logi c 1, lcr bit-4 selects the even or odd parity format. ? logic 0 = odd parity is generated by forcing an odd number of logic 1?s in the transmitted character. the receiver must be programmed to check the same format (default). ? logic 1 = even parity is gen erated by forcing an even numb er of logic 1?s in the tr ansmitted character. the receiver must be programmed to check the same format. bit-1 bit-0 w ord length 0 0 5 (default) 0 1 6 1 0 7 1 1 8 bit-2 w ord length s top bit length (b it time ( s )) 0 5,6,7,8 1 (default) 1 5 1-1/2 1 6,7,8 2
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 29 lcr[5]: tx and rx parity select if the parity bit is enabled, lcr bit- 5 selects the forced parity format. ? lcr bit-5 = logic 0, parity is not forced (default). ? lcr bit-5 = logic 1 and lcr bit-4 = logic 0, parity bit is forced to a logical 1 for the transmit and receive data. ? lcr bit-5 = logic 1 and lcr bit-4 = logic 1, parity bit is forced to a logical 0 for the transmit and receive data. lcr[6]: transmit break enable when enabled, the break control bit causes a break cond ition to be transmitted (the tx output is forced to a ?space?, low, state). this condition remains, un til disabled by setting lcr bit-6 to a logic 0. ? logic 0 = no tx break condition (default). ? logic 1 = forces the transmitter output (tx) to a ?space?, low, for alerting the remote receiver of a line break condition. lcr[7]: baud rate divisors enable baud rate generator divisor (dll/dlm) enable. ? logic 0 = data registers are selected (default). ? logic 1 = divisor latch registers are selected. 4.7 alternate function register (afr) - read/write this register is used to select spec ific modes of mf# operation and to allow both uart register sets to be written concurrently. afr[0]: concurrent write mode when this bit is set, the cpu can wr ite concurrently to the sa me register in both ua rts. this function is intended to reduce the dual uart initialization time . it can be used by the cpu when both channels are initialized to the same state. the external cpu can set or clear this bit by accessing either register set. when this bit is set, the channe l select pin still selects the channel to be accessed during read operations. the user should ensure that lcr bit-7 of both channels are in t he same state before executing a concurrent write to the registers at address 0, 1, or 2. ? logic 0 = no concurrent write (default). ? logic 1 = register set a and b are written concurrent ly with a single external cpu i/o write operation. t able 11: p arity selection lcr b it -5 lcr b it -4 lcr b it -3 p arity selection x x 0 no parity 0 0 1 odd parity 0 1 1 even parity 1 0 1 force parity to mark, ?1? 1 1 1 forced parity to space, ?0?
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 30 afr[2:1]: mf# output select these bits select a signal function for output on the mf# a/b pins. these signal function are described as: op2#, baudout#, or rxrdy#. only one sign al function can be selected at a time. afr[7:3]: reserved 4.8 modem control register (mcr) or general purpose outputs control - read/write the mcr register is used for contro lling the serial/modem interface signal s or general pur pose inputs/outputs. mcr[0]: dtr# output the dtr# pin is a modem control outpu t. if the modem interface is not us ed, this output may be used as a general purpose output. ? logic 0 = force dtr# output high (default). ? logic 1 = force dtr# output low. mcr[1]: rts# output the rts# pin is a modem control output and may be used for automatic hardware flow control enabled by efr bit-6. the rts# output must be asserted before the auto rts can take effect. if the modem interface is not used, this output may be used as a general purpose output. ? logic 0 = force rts# output high (default). ? logic 1 = force rts# output low. if auto rts flow cont rol is enabled, it will take effect after this bit has been set. mcr[2]: reserved op1# is not available as an output pin on the 2852. bu t it is available for use during internal loopback mode. in the loopback mode, this bit is used to wr ite the state of the modem ri# interface signal. mcr[3]: op2# output / int output enable op2# is available as an output pin on the 2852 when afr[ 2:1] = ?00?. in the loopback mode, mcr[3] is used to write the state of the modem cd# interface si gnal. also see pin descriptions for mf# pins. ? logic 0 = forces op2# output high (default). ? logic 1 = forces op2# output low. mcr[4]: internal loopback enable ? logic 0 = disable loopback mode (default). ? logic 1 = enable local loopback mode, see loopback section and figure 13 . mcr[5]: xon-any enable ? logic 0 = disable xon-any function (for 16c550 compat ibility, default). ? logic 1 = enable xon-any function. in this mode, any rx character rece ived will resume transmit operation. the rx character will be loaded into the rx fifo , unless the rx character is an xon or xoff character and the 2852 is programmed to use the xon/xoff flow control. b it -2 b it -1 mf# f unction 0 0 op2# (default) 0 1 baudout# 1 0 rxrdy# 1 1 reserved
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 31 mcr[6]: infrared encoder/decoder enable ? logic 0 = enable the standard modem receive an d transmit input/output interface (default). ? logic 1 = enable infrared irda receive and transmit inputs/outputs. the tx/rx output/input are routed to the infrared encoder/decoder. the data input and output levels conform to the irda infrared interface requirement. while in this mode, the infrared tx output will be low during idle data conditions. mcr[7]: clock prescaler select ? logic 0 = divide by one. the input clock from the crystal or external clock is fed directly to the programmable baud rate generator without further modification, i.e., divide by one (default). ? logic 1 = divide by four. the prescaler divides the input clock from the crystal or external clock by four and feeds it to the programmable baud rate generator, hence, data rates become one forth. 4.9 line status register (lsr) - read only this register provides the status of data transfers between the uart and the host. lsr[0]: receive data ready indicator ? logic 0 = no data in receive holding register or fifo (default). ? logic 1 = data has been received and is save d in the receive holding register or fifo. lsr[1]: receiver overrun flag ? logic 0 = no overrun error. (default) ? logic 1 = overrun error. a data overrun error condition occurred in the receive shift register. this happens when additional data arrives while the fi fo is full. in this case the previous data in the receive shift register is overwritten. note that under this condition the data byte in the receive shift register is not transferred into the fifo, therefore the data in the fifo is not corrupted by the error. lsr[2]: receive data parity error flag ? logic 0 = no parity error (default). ? logic 1 = parity error. the receive character in rhr does not have correct parity information and is suspect. this error is associated with the char acter available for reading in rhr. lsr[3]: receive data framing error flag ? logic 0 = no framing error (default). ? logic 1 = framing error. the receive character did not hav e a valid stop bit(s). this error is associated with the character available for reading in rhr. lsr[4]: receive break flag ? logic 0 = no break condition (default). ? logic 1 = the receiver received a break signal (rx wa s low for at least one char acter frame time). in the fifo mode, only one break character is loaded into the fifo. the break indication remains until the rx input returns to the idle condition, ?mark? or high. lsr[5]: transmit holding register empty flag this bit is the transmit holding register empty indicator. the thr bit is set to a logic 1 when the last data byte is transferred from the transmit holding register to th e transmit shift register. t he bit is reset to logic 0 concurrently with the data loading to the transmit holding r egister by the host. in the fifo mode this bit is set when the transmit fifo is empty, it is cleared when the transmit fifo contains at least 1 byte. lsr[6]: thr and tsr empty flag this bit is set to a logic 1 whenever the transmitter goes idle. it is set to logic 0 whenever either the thr or tsr contains a data character. in the fifo mode this bi t is set to a logic 1 whenever the transmit fifo and transmit shift register are both empty.
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 32 lsr[7]: receive fifo data error flag ? logic 0 = no fifo error (default). ? logic 1 = a global indicator for the sum of all error bits in the rx fifo. at least one parity error, framing error or break indication is in the fifo data. this bit clears when there is no more error(s) in any of the bytes in the rx fifo. 4.10 modem status register (msr) - read only this register provides the current state of the modem interf ace input signals. lower four bits of this register are used to indicate the changed information. these bits are set to a logic 1 whenever a signal from the modem changes state. these bits may be used as general purpose inputs when they are not used with modem signals. msr[0]: delta cts# input flag ? logic 0 = no change on cts# input (default). ? logic 1 = the cts# input has changed state since the la st time it was monitored. a modem status interrupt will be generated if msr interrup t is enabled (ier bit-3). msr[1]: delta ds r# input flag ? logic 0 = no change on dsr# input (default). ? logic 1 = the dsr# input has changed state since the last time it was monitored. a modem status interrupt will be generated if msr interrup t is enabled (ier bit-3). msr[2]: delta ri# input flag ? logic 0 = no change on ri# input (default). ? logic 1 = the ri# input has changed from a logic 0 to a logic 1, ending of the ringi ng signal. a modem status interrupt will be ge nerated if msr in terrupt is enabled (ier bit-3). msr[3]: delta cd# input flag ? logic 0 = no change on cd# input (default). ? logic 1 = indicates that the cd# input has changed st ate since the last time it was monitored. a modem status interrupt will be generated if ms r interrupt is enab led (ier bit-3). msr[4]: cts input status cts# pin may function as automatic hardware flow control signal input if it is enabled and selected by auto cts (efr bit-7). auto cts flow control allows starting and stopping of local data transmissions based on the modem cts# signal. a high on the cts# pin will stop uart transmitte r as soon as the current character has finished transmission, and a low will re sume data transmission. normally ms r bit-4 bit is the complement of the cts# input. however in the loopback mode, this bit is equivalent to the rts# bit in the mcr register. the cts# input may be used as a general purpose input when the modem interface is not used. msr[5]: dsr input status normally this bit is the complement of the dsr# input. in the loopback mode , this bit is equivalent to the dtr# bit in the mcr register. the dsr# input may be used as a general purpose input when the modem interface is not used. msr[6]: ri input status normally this bit is the complement of the ri# input. in the loopback mode th is bit is equivalent to bit-2 in the mcr register. the ri# input may be used as a general purpose input when the modem interface is not used.
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 33 msr[7]: cd input status normally this bit is the complement of the cd# input. in the loopback mode this bit is equivalent to bit-3 in the mcr register. the cd# input may be used as a general purpose input when the modem interface is not used. 4.11 scratch pad register (spr) - read/write this is a 8-bit general purpose register for the user to store temporary data. the content of this register is preserved during sleep mode but becomes 0xff (default) after a reset or a power off-on cycle. 4.12 enhanced mode select register (emsr) this register replaces spr (during a write) and is accessible only when fctr[6] = 1. emsr[1:0]: receive/transmi t fifo count (write-only) when scratchpad swap (fctr[6]) is asserted, emsr bits 1-0 controls what mode the fifo level counter is operating in. during alternate rx/tx fifo counter mode, the first value read after emsr bits 1-0 have been asserted will always be the rx fifo counter. the second value read will correspond wit h the tx fifo counter. the next value will be the rx fifo counter again, then t he tx fifo counter and so on and so forth. emsr[3:2]: reserved t able 12: s cratchpad s wap s election fctr[6] emsr[1] emsr[0] s cratchpad is 0 x x scratchpad 1 0 0 rx fifo counter mode 1 0 1 tx fifo counter mode 1 1 0 rx fifo counter mode 1 1 1 alternate rx/tx fifo counter mode
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 34 emsr[5:4]: extended rts hysteresis emsr[7:6]: reserved 4.13 fifo level register (flvl) - read-only the fifo level register replaces the scratchpad regist er (during a read) when fctr[6] = 1. note that this is not identical to the fifo data count r egister which can be accessed when lcr = 0xbf. flvl[7:0]: fifo level register this register provides the fifo counter level for the rx fifo or the tx fifo or both depending on emsr[1:0]. see table 12 for details. 4.14 baud rate generator registers (dll and dlm) - read/write the concatenation of the contents of dlm and dll gives the 16-bit divisor value which is used to calculate the baud rate: ? baud rate = (clock frequency / 16) / divisor see mcr bit-7 and the baud rate table also. t able 13: e xtended rts h ysteresis emsr b it -5 emsr b it -4 fctr b it -1 fctr b it -0 rts# h ysteresis (c haracters ) 0 0 0 0 0 0 0 0 1 4 0 0 1 0 6 0 0 1 1 8 0 1 0 0 8 0 1 0 1 16 0 1 1 0 24 0 1 1 1 32 1 0 0 0 40 1 0 0 1 44 1 0 1 0 48 1 0 1 1 52 1 1 0 0 12 1 1 0 1 20 1 1 1 0 28 1 1 1 1 36
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 35 4.15 device identification register (dvid) - read only this register contains the device id (0x12 for xr16c2 852). prior to reading this register, dll and dlm should be set to 0x00. 4.16 device revision register (drev) - read only this register contains the device revision information. for example, 0x01 means revision a. prior to reading this register, dll and dlm should be set to 0x00. 4.17 trigger level / fifo data count register (trg) - write-only user programmable transmit/receive trigger level register. trg[7:0]: trigger level register these bits are used to program desired trigger levels wh en trigger table-d is selected. fctr bit-7 selects between programming the rx trigger level (a logic 0) and the tx trigger level (a logic 1). 4.18 fifo data count register (fc) - read-only this register is accessible when lcr = 0xbf. note that th is register is not identical to the fifo level register which is located in the general regi ster set when fctr bit-6 = 1. fc[7:0]: fifo data count register transmit/receive fifo count. number of characters in transmit (fctr[7] = 1) or receive fifo (fctr[7] = 0) can be read via this register. 4.19 feature control regi ster (fctr) - read/write this register controls t he xr16c2852 new functions. fctr[1:0]: rts hysteresis user selectable rts# hysteresis levels for hardware flow control application. after reset, these bits are set to ?0? to select the next trigger leve l for hardware flow control. see ta b l e 13 on page 34 for more details. fctr[2]: irda rx inversion ? logic 0 = select rx input as encoded irda data. ? logic 1 = select rx input as active high encoded irda data. fctr[3]: auto rs-485 direction control ? logic 0 = standard st16c550 mode. transmitter generates an interrupt when transmit holding register becomes empty and transmit shift register is shifting data out. ? logic 1 = enable auto rs485 direction control function. the direction control signal, rts# pin, changes its output logic state from low to high one bit time after the last stop bit of the last character is shifted out. also, the transmit interrupt generation is delayed until the transmitter shift register becomes empty. the rts# output pin will automatically return to a logic low when a data byte is loaded into the tx fifo. fctr[5:4]: transmit/receive trigger table select see ta b l e 10 on page 27 . t able 14: t rigger t able s elect fctr b it -5 fctr b it -4 t able 0 0 table-a (tx/rx) 0 1 table-b (tx/rx) 1 0 table-c (tx/rx) 1 1 table-d (tx/rx)
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 36 fctr[6]: scratchpad swap ? logic 0 = scratch pad register is selected as genera l read and write register. st16c550 compatible mode. ? logic 1 = fifo count register (read-only), enhanced mode select register (write-only). number of characters in transmit or receive fifo can be read vi a scratch pad register when this bit is set. enhanced mode select register is select ed when it is written into. fctr[7]: programmable trigger register select ? logic 0 = registers trg and fc selected for rx. ? logic 1 = registers trg and fc selected for tx. 4.20 enhanced feature register (efr) enhanced features are enabled or disabled using this register. bit 0-3 provide si ngle or dual consecutive character software flow control selection (see ta b l e 15 ). when the xon1 and xon2 and xoff1 and xoff2 modes are selected, the double 8-bit words are concatenated in to two sequential characters. caution: note that whenever changing the tx or rx flow control bits, always reset all bits back to logic 0 (disable) before programming a new setting. efr[3:0]: software flow control select single character and dual sequential characters software flow control is supported. combinations of software flow control can be selected by programming these bits. t able 15: s oftware f low c ontrol f unctions efr bit -3 c ont -3 efr bit -2 c ont -2 efr bit -1 c ont -1 efr bit -0 c ont -0 t ransmit and r eceive s oftware f low c ontrol 0 0 0 0 no tx and rx flow control (default and reset) 0 0 x x no transmit flow control 1 0 x x transmit xon1, xoff1 0 1 x x transmit xon2, xoff2 1 1 x x transmit xon1 and xon2, xoff1 and xoff2 x x 0 0 no receive flow control x x 1 0 receiver compares xon1, xoff1 x x 0 1 receiver compares xon2, xoff2 1 0 1 1 transmit xon1, xoff1 receiver compares xon1 or xon2, xoff1 or xoff2 0 1 1 1 transmit xon2, xoff2 receiver compares xon1 or xon2, xoff1 or xoff2 1 1 1 1 transmit xon1 and xon2, xoff1 and xoff2, receiver compares xon1 and xon2, xoff1 and xoff2 0 0 1 1 no transmit flow control, receiver compares xon1 and xon2, xoff1 and xoff2
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 37 efr[4]: enhanced function bits enable enhanced function control bit. this bit enables ier bits 4-7, isr bits 4-5, fcr bits 4-5, and mcr bits 5-7 to be modified. after modifying any enhanced bits, efr bit-4 can be set to a logic 0 to latch the new values. this feature prevents legacy software from altering or over writing the enhanced functions once set. normally, it is recommended to leave it enabled, logic 1. ? logic 0 = modification disable/latch en hanced features. ier bits 4-7, isr bits 4-5, fcr bits 4-5, and mcr bits 5-7 are saved to retain the user settings. after a reset, the ier bits 4-7, isr bits 4-5, fcr bits 4-5, and mcr bits 5-7are set to a logic 0 to be compatible with st16c550 mode (default). ? logic 1 = enables the above-mentioned register bits to be modified by the user. efr[5]: special character detect enable ? logic 0 = special character detect disabled (default). ? logic 1 = special character detect enabled. the ua rt compares each incomi ng receive character with data in xoff-2 register. if a match exists, the receive data will be transfer red to fifo and isr bit-4 will be set to indicate detection of the special character. bit-0 co rresponds with the lsb bit of the receive character. if flow control is set for comparing xon1, xo ff1 (efr [1:0]= ?10?) then flow control and special character work normally. however, if flow control is set for comparing xon2, xoff2 (efr[1:0]= ?01?) then flow control works normally, but xoff2 will not go to the fifo, and will ge nerate an xoff interrupt and a special character interrupt, if enabled via ier bit-5. efr[6]: auto rts flow control enable rts# output may be used for hardware flow control by setting efr bit-6 to logic 1. when auto rts is selected, an interrupt will be generated when the receive fifo is fi lled to the programm ed trigger level and rts de-asserts to a logic 1 at the nex t upper trigger level. rts# will return to a logic 0 when fifo data falls below the next lower trigger level. the rts# output must be asserted (logic 0) before the auto rts can take effect. rts# pin will function as a general purpose ou tput when hardware flow control is disabled. ? logic 0 = automatic rts flow control is disabled (default). ? logic 1 = enable automatic rts flow control. efr[7]: auto cts flow control enable automatic cts flow control. ? logic 0 = automatic cts flow control is disabled (default). ? logic 1 = enable automatic cts flow control. data tr ansmission stops when cts# input de-asserts to logic 1. data transmission resumes when cts# returns to a logic 0. 4.21 software flow control registers (xoff1, xoff2, xon1, xon2) - read/write these registers are used as the programmable software flow control characters xoff1, xoff2, xon1, and xon2. for more details, see ta b l e 6 on page 17 .
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 38 t able 16: uart reset conditions for channel a and b registers reset state dll bits 7-0 = 0xxx dlm bits 7-0 = 0xxx afr bits 7-0 = 0x00 rhr bits 7-0 = 0xxx thr bits 7-0 = 0xxx ier bits 7-0 = 0x00 fcr bits 7-0 = 0x00 isr bits 7-0 = 0x01 lcr bits 7-0 = 0x00 mcr bits 7-0 = 0x00 lsr bits 7-0 = 0x60 msr bits 3-0 = logic 0 bits 7-4 = logic levels of the inputs inverted spr bits 7-0 = 0xff emsr bits 7-0 = 0x80 flvl bits 7-0 = 0x00 efr bits 7-0 = 0x00 xon1 bits 7-0 = 0x00 xon2 bits 7-0 = 0x00 xoff1 bits 7-0 = 0x00 xoff2 bits 7-0 = 0x00 fc bits 7-0 = 0x00 i/o signals reset state tx high op1# high mf# high rts# high dtr# high txrdy# low int low
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 39 test 1: the following inputs should remain steady at vcc or gnd state to minimize sleep current: a0-a2, d0-d7, ior#, iow#, chsel and cs#. also, rxa and rxb inputs must idle at logic 1 state while asleep. absolute maximum ratings power supply range 7 volts voltage at any pin gnd-0.3 v to 7 v operating temperature -40 o to +85 o c storage temperature -65 o to +150 o c package dissipation 500 mw typical package thermal resistance data (margin of error: 15%) thermal resistance (44-plcc) theta-ja = 50 o c/w, theta-jc = 21 o c/w electrical characteristics dc electrical characteristics u nless otherwise noted : ta=0 o to 70 o c (-40 o to +85 o c for industrial grade package ), v cc is 3.3v, 5.0v 10% s ymbol p arameter l imits 3.3v m in m ax l imits 5.0v m in m ax u nits c onditions v ilck clock input low level -0.3 0.6 -0.5 0.6 v v ihck clock input high level (top mark date code of "dc yyww" and older) 2.4 vcc 3.0 vcc v v ihck clock input high level (top mark date code of "f2 yyww" and newer) 2.4 5.5 3.0 5.5 v v il input low voltage -0.3 0.8 -0.5 0.8 v v ih input high voltage (top mark date code of "dc yyww" and older) 2.0 vcc 2.2 vcc v v ih input high voltage (top mark date code of "f2 yyww" and newer) 2.0 5.5 2.0 5.5 v v olck clock output (xtal2) low voltage 0.4 0.4 v i ol = 6 ma i ol = 4 ma v ohck clock output (xtal2) high voltage 2.0 2.4 v i oh = -6 ma i oh = -1 ma v ol output low voltage see figure 14 . v oh output high voltage see figure 15 . i il input low leakage current 10 10 ua i ih input high leakage current 10 10 ua c in input pin capacitance 5 5 pf i cc power supply current 2.7 4 ma i sleep sleep current 30 50 ua see test 1
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 40 . . f igure 14. xr16c2852 vol s ink c urrent c hart f igure 15. xr16c2852 voh s ource c urrent c hart xr16c2852 sink current 0 2 4 6 8 10 12 14 16 18 20 22 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 vol (v) iol (ma) vcc=5v vcc=3.3v xr16c2852 source current 0 2 4 6 8 10 12 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 voh (v) ioh (ma) vcc=5v vcc=3.3v
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 41 ac electrical characteristics ta=0 o to 70 o c (-40 o to +85 o c for industrial grade package ), v cc is 2.97v to 5.5v, 70 p f l oad where applicable s ymbol p arameter l imits 3.3 m in m ax l imits 5.0 m in m ax u nit c onditions clk clock pulse duration 30 20 ns osc oscillator frequency 8 24 mhz osc external clock frequency 33 50 mhz t as address setup time 10 5 ns t ah address hold time (as# tied to gnd) (top mark date code of "dc yyww" and older) 10 5 ns t ah address hold time (as# tied to gnd) (top mark date code of "f2 yyww" and newer) 0 0 ns t cs chip select width 66 50 ns t rd ior# strobe width 35 25 ns t dy read cycle delay 40 30 ns t rdv data access time 50 35 ns t dd data disable time 0 35 0 25 ns t wr iow# strobe width 40 25 ns t dy write cycle delay 40 30 ns t ds data setup time 10 5 ns t dh data hold time 10 5 ns t wdo delay from iow# to output 50 40 ns 100 pf load t mod delay to set interrupt from modem input 40 35 ns 100 pf load t rsi delay to reset interrupt from ior# 40 35 ns 100 pf load t ssi delay from stop to set interrupt 1 1 bclk t rri delay from ior# to reset interrupt 45 40 ns 100 pf load t si delay from stop to interrupt 45 40 ns t int delay from initial int reset to transmit start 8 24 8 24 bclk t wri delay from iow# to reset interrupt 45 40 ns t ssr delay from stop to set rxrdy# 1 1 bclk t rr delay from ior# to reset rxrdy# 45 40 ns t wt delay from iow# to set txrdy# 45 40 ns
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 42 t srt delay from center of start to reset txrdy# 8 8 bclk t rst reset pulse width 40 40 ns n baud rate divisor 1 2 16 -1 1 2 16 -1 - bclk baud clock 16x of data rate hz f igure 16. c lock t iming f igure 17. m odem i nput /o utput t iming f or c hannels a & b ac electrical characteristics ta=0 o to 70 o c (-40 o to +85 o c for industrial grade package ), v cc is 2.97v to 5.5v, 70 p f l oad where applicable s ymbol p arameter l imits 3.3 m in m ax l imits 5.0 m in m ax u nit c onditions osc clk clk external clock iow # rts# dtr# cd# cts# dsr# int ior# ri# t wdo t mod t mod t rsi t mod active active change of state change of state active active active change of state change of state change of state active active
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 43 f igure 18. d ata b us r ead t iming f igure 19. d ata b us w rite t iming t as t dd t ah t rd t rdv t dy t dd t rdv t ah t as t cs valid address valid address valid data valid data a0- a2 cs# ior# d0-d7 rdtm t cs t rd 16write t as t dh t ah t wr t ds t dy t dh t ds t ah t as t cs valid address valid address valid data valid data a0- a2 cs# iow# d0-d7 t cs t wr
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 44 f igure 20. r eceive r eady & i nterrupt t iming [n on -fifo m ode ] for c hannels a & b f igure 21. t ransmit r eady & i nterrupt t iming [n on -fifo m ode ] for c hannels a & b rx rxrdy# ior# int d0:d7 start bit d0:d7 stop bit d0:d7 t ssr 1 byte in rhr active data ready active data ready active data ready 1 byte in rhr 1 byte in rhr t ssr t ssr rxnfm t rr t rr t rr t ssr t ssr t ssr (reading data out of rhr) tx txrdy# iow# int* d0:d7 start bit d0:d7 stop bit d0:d7 t wt txnonfifo t wt t wt t wri t wri t wri t srt t srt t srt *int is cleared when the isr is read or when data is loaded into the thr. isr is read isr is read isr is read (loading data into thr) (unloading) ier[1] enabled
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 45 f igure 22. r eceive r eady & i nterrupt t iming [fifo m ode , dma d isabled ] for c hannels a & b f igure 23. r eceive r eady & i nterrupt t iming [fifo m ode , dma e nabled ] for c hannels a & b rx rxrdy# ior# int d0:d7 s t ssr rxintdma# rx fifo fills up to rx trigger level or rx data timeout rx fifo drops below rx trigger level fifo empties first byte is received in rx fifo d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit stop bit t rr t rri t ssi (reading data out of rx fifo) rx rxrdy# ior# int d0:d7 s t ssr rxfifodma rx fifo fills up to rx trigger level or rx data timeout rx fifo drops below rx trigger level fifo empties d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit stop bit t rr t rri t ssi (reading data out of rx fifo)
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 46 f igure 24. t ransmit r eady & i nterrupt t iming [fifo m ode , dma m ode d isabled ] for c hannels a & b f igure 25. t ransmit r eady & i nterrupt t iming [fifo m ode , dma m ode e nabled ] for c hannels a & b tx txrdy# iow# int* txdma# d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit stop bit t wri (unloading) (loading data into fifo) last data byte transmitted tx fifo fills up to trigger level tx fifo drops below trigger level data in tx fifo tx fifo empty t wt t srt tx fifo empty t t s t si isr is read ier[1] enabled isr is read *int is cleared when the isr is read or when tx fifo fills up to the trigger level. tx txrdy# iow# int* d0:d7 s txdma d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit stop bit t wri t (unloading) (loading data into fifo) last data byte transmitted tx fifo fills up to trigger level tx fifo drops below trigger level at least 1 empty location in fifo t srt tx fifo full t wt t si isr read isr read *int cleared when the isr is read or when tx fifo fills up to trigger level. ier[1] enabled
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 47 package dimensions (44 pin plcc) note: the control dimensio n is the millimeter column inches millimeters symbol min max min max a 0.165 0.180 4.19 4.57 a 1 0.090 0.120 2.29 3.05 a 2 0.020 --- 0.51 --- b 0.013 0.021 0.33 0.53 b 1 0.026 0.032 0.66 0.81 c 0.008 0.013 0.19 0.32 d 0.685 0.695 17.40 17.65 d 1 0.650 0.656 16.51 16.66 d 2 0.590 0.630 14.99 16.00 d 3 0.500 typ. 12.70 typ. e 0.050 bsc 1.27 bsc h 1 0.042 0.056 1.07 1.42 h 2 0.042 0.048 1.07 1.22 r 0.025 0.045 0.64 1.14 44 lead plastic leaded chip carrier (plcc) rev. 1.00 1 d d 1 a a 1 d d 1 d 3 b a 2 b 1 e seating plane d 2 244 d 3 c r 45 x h 2 45 x h 1
xr16c2852 xr 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 48 revision history date revision description july 1999 rev 1.0.0 initial datasheet. april 2002 rev 2.0.0 changed to standard style format. internal registers are described in the order they are listed in the internal register table. clarified timing diagrams. corrected auto rts hysteresis table. renamed rclk (receive clock) to bclk (baud clock) and tim - ing symbols. added t ah , t cs and osc. may 2004 rev 2.1.0 changed to single column format. added device status to ordering information. clarified sleep mode conditions. clarified pi n descriptions- changed from using logic 1 and logic 0 to high (vcc) and low (gnd) for input and output pin descriptions. added vol sink current and vo h source current charts ( figure 14 and figure 15 ). devices with top mark date code of "f2 yyww" and newer have 5v tolerant inputs (except for xtal1) and have 0 ns address hold time (t ah ). drev register was updated to 0x06. february 2005 rev 2.1.1 corrected datasheet to show that all inputs are 5v tolerant (including xtal1) in devices with top mark date code of "f2 yyww" and newer.
xr xr16c2852 rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos 49 notice exar corporation reserves the right to make changes to the products contained in this publicat ion in order to improve design, performanc e or reliability. exar corp oration assumes no responsibility for the use of any circuits described herein, conveys no license under any patent or other right, and makes no representation that the circuits are free of patent in fringement. charts and sc hedules contained here in are only for illustration purposes and may vary depending upon a user?s specific application. while the information in this publication has been carefully ch ecked; no responsibility, however , is assumed for inaccuracies. exar corporation does not re commend the use of any of its products in life suppo rt applications where the failure or malfunction of the product can reasonably be ex pected to cause failure of the life support system or to significantly affect its safety or effectiveness. products ar e not authorized for use in such applications unless exar corporation receives , in writing, assurances to its satisfaction that: (a) the ri sk of injury or damage has been minimized; (b) the us er assumes all such risks; (c) potential liability of exar corporation is adequately protected under the circumstances. copyright 2005 exar corporation datasheet february 2005. send your uart technical inquiry with technical details to hotline: uarttechsupport@exar.com . reproduction, in part or whole, without the prior written consent of exar co rporation is prohibited.
xr16c2852 xr rev. 2.1.1 2.97v to 5.5v dual uart with 128-byte fifos i table of contents general description ......... ................ ................ ................. .............. .............. ...........1 a pplications ............................................................................................................................... .................1 f eatures ............................................................................................................................... ......................1 f igure 1. xr16c2852 b lock d iagram ............................................................................................................................... .......... 1 f igure 2. p in o ut a ssignment ............................................................................................................................... ...................... 2 ordering information ............................................................................................................................... ..2 pin descriptions ............ ................ ................. ................ ................. ................ ...........3 1.0 product description ..................................................................................................... ................6 2.0 functional descriptions ................................................................................................. ............7 2.1 cpu interface ........................................................................................................... ................................... 7 f igure 3. xr16c2852 d ata b us i nterconnections ................................................................................................................. 7 2.2 device reset .... .............. .............. .............. .............. .............. .............. ........... ......... .................................... 7 2.3 device identification and revision ........... ........................................................................... ............... 7 2.4 channel a and b selection .... .............. .............. .............. .............. .............. ........... .......... ..................... 7 t able 1: c hannel a and b s elect ............................................................................................................................... ................ 8 2.5 channel a and b internal registers ................. .............. .............. .............. .............. ............. .......... 8 2.6 simultaneous write to channel a and b .......... .............. .............. ........... ............ ........... ........... ...... 8 2.7 dma mode ................................................................................................................ ....................................... 8 t able 2: txrdy# and rxrdy# o utputs in fifo and dma m ode ............................................................................................. 9 2.8 inta and intb ouputs .................................................................................................... ............................ 9 t able 3: inta and intb p ins o peration for t ransmitter ........................................................................................................ 9 t able 4: inta and intb p in o peration f or r eceiver ............................................................................................................... 9 2.9 crystal oscillator or external clock input ............ .............. .............. .............. .............. ......... 9 f igure 4. t ypical oscillator connections ............................................................................................................................... 10 2.10 programmable baud rate generat or ............ .............. .............. .............. ........... ............ .......... .. 10 f igure 5. e xternal c lock c onnection for e xtended d ata r ate .......................................................................................... 10 f igure 6. b aud r ate g enerator and p rescaler ..................................................................................................................... 11 t able 5: t ypical data rates with a 14.7456 mh z crystal or external clock ...................................................................... 11 2.11 transmitter ........ .............. .............. .............. .............. ........... ............ ........... .......... ................................. 11 2.11.1 transmit holding register (thr) - write only .......................................................................... ............. 12 2.11.2 transmitter operatio n in non-fifo mode ................................................................................ ................ 12 f igure 7. t ransmitter o peration in non -fifo m ode .............................................................................................................. 12 2.11.3 transmitter operation in fifo mode .................................................................................... ..................... 12 f igure 8. t ransmitter o peration in fifo and f low c ontrol m ode ..................................................................................... 13 2.12 receiver ............................................................................................................... ..................................... 13 2.12.1 receive holding register (rhr) - read-only ............................................................................ .............. 13 f igure 9. r eceiver o peration in non -fifo m ode .................................................................................................................... 14 f igure 10. r eceiver o peration in fifo and a uto rts f low c ontrol m ode ....................................................................... 14 2.13 auto rts (hardware) flow co ntrol ........... .............. .............. .............. .............. ........... ......... ...... 15 2.14 auto rts hysteresis ................................................................................................... ......................... 15 2.15 auto cts flow control .................................................................................................. .................... 15 f igure 11. a uto rts and cts f low c ontrol o peration ....................................................................................................... 16 2.16 auto xon/xoff (software) flow control .................................................................................. . 17 t able 6: a uto x on /x off (s oftware ) f low c ontrol ............................................................................................................... 17 2.17 special character detect .. ............. .............. .............. .............. .............. .............. ......... ................. 17 2.18 auto rs485 half-duplex control ........................................................................................ .......... 17 2.19 infrared mode ...... .............. .............. .............. .............. ........... ........... ............ .......... .............................. 18 f igure 12. i nfrared t ransmit d ata e ncoding and r eceive d ata d ecoding .......................................................................... 18 2.20 sleep mode with auto wake-u p ............ .............. .............. .............. .............. ........... ........... ............. 19 2.21 internal loopback ..................................................................................................... ......................... 20 f igure 13. i nternal l oop b ack in c hannels a and b .............................................................................................................. 20 3.0 uart internal registers ................................................................................................. ..........21 t able 7: uart channel a and b uart internal registers............................................................................ .......... 21 t able 8: internal registers description. s haded bits are enabled when efr b it -4=1....................................... 22 4.0 internal register descriptions .......................................................................................... ...23 4.1 receive holding register (rhr) - read- only .. .............. .............. .............. ........... ............ .......... .. 23 4.2 transmit holding register (thr) - write-only ............................................................................ 23 4.3 interrupt enable register (ier ) - read/write .......... .............. .............. .............. .............. .......... .. 23 4.3.1 ier versus receive fifo interrupt mode operation ....................................................................... ...... 24
xr xr16c2852 2.97v to 5.5v dual uart with 128-byte fifos rev. 2.1.1 ii 4.3.2 ier versus receive/transmit fifo polled mode operation................................................................ 24 4.4 interrupt status register (isr) - read-only ............................................................................. .. 25 4.4.1 interrupt generation: .................................................................................................. .................................... 25 4.4.2 interrupt clearing: .................................................................................................... ....................................... 25 t able 9: i nterrupt s ource and p riority l evel ....................................................................................................................... 26 4.5 fifo control register (fcr) - write-only ................................................................................ ..... 26 t able 10: t ransmit and r eceive fifo t rigger t able and l evel s election .......................................................................... 27 4.6 line control register (lcr) - read/write ................................................................................ ..... 28 t able 11: p arity selection ............................................................................................................................... ......................... 29 4.7 alternate function register (afr) - read/write ....................................................................... 29 4.8 modem control register (mcr) or gene ral purpose outputs control - read/write 30 4.9 line status register (lsr) - read only .................................................................................. ......... 31 4.10 modem status register (msr) - read only ................................................................................ .. 32 4.11 scratch pad register (spr) - read/write ................................................................................ .... 33 4.12 enhanced mode select register (emsr) ................................................................................... ... 33 t able 12: s cratchpad s wap s election ............................................................................................................................... ..... 33 t able 13: e xtended rts h ysteresis ............................................................................................................................... ......... 34 4.13 fifo level register (flvl) - read-only ................................................................................. ........ 34 4.14 baud rate generator registers (dll and dlm) - read/write ....... ........... ............ ........... ..... 34 4.15 device identification register (dvid) - read only .................................................................... 3 5 4.16 device revision register (drev) - read only ............................................................................ .. 35 4.17 trigger level / fifo data co unt register (trg) - wr ite-only ......... .............. .............. ........ 35 4.18 fifo data count register (fc) - read-only .............................................................................. ... 35 4.19 feature control register (fctr) - read/write ....................................................................... 35 t able 14: t rigger t able s elect ............................................................................................................................... ................ 35 4.20 enhanced feature register (efr) ........................................................................................ .......... 36 t able 15: s oftware f low c ontrol f unctions ........................................................................................................................ 36 4.21 software flow control registers (xoff1, xoff2, xon1, xon2) - read/write ................ 37 t able 16: uart reset conditions for channel a and b................................................................................ ............ 38 absolute maximum ratings ......... ................. ................ .............. .............. ............ 39 typical package thermal resistance data (margin of error: 15%) 39 electrical characteristics....... ................. ................ .............. .............. ............ 39 dc e lectrical c haracteristics .............................................................................................................. 39 f igure 14. xr16c2852 vol s ink c urrent c hart ................................................................................................................... 40 f igure 15. xr16c2852 voh s ource c urrent c hart ............................................................................................................. 40 ac e lectrical c haracteristics .............................................................................................................. 41 ta=0 o to 70 o c (-40 o to +85 o c for industrial grade package ), v cc is 2.97v to 5.5v, 70 p f l oad where applicable ............................................................................................................................... .................. 41 f igure 16. c lock t iming ............................................................................................................................... .............................. 42 f igure 17. m odem i nput /o utput t iming f or c hannels a & b ................................................................................................. 42 f igure 18. d ata b us r ead t iming ............................................................................................................................... ............... 43 f igure 19. d ata b us w rite t iming ............................................................................................................................... ............. 43 f igure 21. t ransmit r eady & i nterrupt t iming [n on -fifo m ode ] for c hannels a & b ....................................................... 44 f igure 20. r eceive r eady & i nterrupt t iming [n on -fifo m ode ] for c hannels a & b ......................................................... 44 f igure 22. r eceive r eady & i nterrupt t iming [fifo m ode , dma d isabled ] for c hannels a & b........................................ 45 f igure 23. r eceive r eady & i nterrupt t iming [fifo m ode , dma e nabled ] for c hannels a & b......................................... 45 f igure 24. t ransmit r eady & i nterrupt t iming [fifo m ode , dma m ode d isabled ] for c hannels a & b ........................... 46 f igure 25. t ransmit r eady & i nterrupt t iming [fifo m ode , dma m ode e nabled ] for c hannels a & b ............................ 46 package dimensions (44 pin plcc ) ................. .............. .............. .............. ............ 47 t able of c ontents .............. ................ ................ ................. ................ ................. ............ i


▲Up To Search▲   

 
Price & Availability of XR16C285205

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X